﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XYTXL.API;
using XYTXL.Data;
using XYTXL.AppCode;

namespace XYTXL.Web.View.UCMangForm
{
    public partial class GWGL : FormUControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                
            }
        }

       
       

        /// <summary>
        /// 重写父类的保存数据方法
        /// </summary>
        /// <param name="intFormID">数据ID</param>
        /// <param name="strActionType">操作类型("ADD":"添加","UPDATE":"修改")</param>
        /// <returns></returns>
        public override bool SaveForm(int intFormID, string strActionType,int pid)
        {
            //执行 父类的方法
            base.SaveForm(intFormID, strActionType);

            //保存数据
            xy_gwlb Model = new xy_gwlbB().GetEntity(d => d.ID == intFormID);
            Model.gwlb = txtName.Text;


            return new xy_gwlbB().Update(Model);
        }

       


        public override void initMangerForm(int intFormID, string strActionType)
        {
            base.initMangerForm(intFormID, strActionType);
            xy_gwlb Model = new xy_gwlbB().GetEntity(d => d.ID == intFormID);
            txtName.Text = Model.gwlb;
        
        }

    }
}